Skip to content

[codex] Add task check toggle command - #91

Open
bendsp wants to merge 2 commits into
codex/editor-quality-passfrom
codex/feature-task-list-check-toggle
Open

[codex] Add task check toggle command#91
bendsp wants to merge 2 commits into
codex/editor-quality-passfrom
codex/feature-task-list-check-toggle

Conversation

@bendsp

@bendsp bendsp commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an editor command to toggle Markdown task item checked state
  • expose the task check toggle from the editor context menu
  • cover checked, unchecked, and non-task fallthrough behavior with unit tests

Validation

  • pnpm lint
  • pnpm typecheck
  • pnpm test:unit

Copilot AI review requested due to automatic review settings May 9, 2026 14:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new CodeMirror editor command to toggle the checked state of Markdown task items, wires it into the renderer command system, and exposes it in the editor context menu. Unit tests cover checked, unchecked, and non-task fallthrough behavior.

Changes:

  • Implement toggleTaskCheckCommand to toggle - [ ]- [x] across selected lines.
  • Register the new command in the command registry and add a context menu entry to invoke it.
  • Add unit tests validating checked/unchecked toggling and fallthrough when no task items are selected.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/controllerShortcuts.test.ts Adds unit tests for toggling task check state and fallthrough behavior.
src/renderer/editor/codemirror/commands.ts Implements toggleTaskCheckCommand to toggle Markdown task checkbox markers.
src/renderer/components/EditorContextMenu.tsx Adds a context menu item to trigger the new toggle task check command.
src/renderer/commands/commandSystem.ts Registers the new command id and maps it to the CodeMirror command implementation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +372 to +377
{
id: "insert.toggleTaskCheck",
title: "Toggle task check",
category: "Insert",
description: "Toggle checked state for task checklist items.",
requiresEditor: true,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants